package com.shierke.Ume.ui.activity.register

import android.content.Context
import android.os.Bundle
import com.shierke.Ume.R
import com.shierke.Ume.base.BaseActivity
import com.shierke.Ume.util.click
import com.shierke.Ume.util.startActivity
import com.xbxm.supplier.crm.utils.toastCenter
import kotlinx.android.synthetic.main.activity_phone_login.*

/**
 * Create by Ybx
 * on 2020-10-11
 * Desribe:
 */
class PhoneLoginActivity : BaseActivity() {


    companion object {

        fun startActivity(context: Context) {
            context.startActivity<PhoneLoginActivity>()
        }

    }


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.activity_phone_login)


        phoneEdit.setText("18801245571")

        val phone = phoneEdit.text.toString()

        contiune.click {
            if (!phone.isNullOrEmpty()) {
                VerificationCodeActivity.startActivity(this, phone, "+86")
            } else {
                toastCenter("请输入手机号")

            }
        }

        chooseCountry.click { ChooseCountryActivity.startActivity(this) }
    }


}